package com.example.food03.bool;

import static com.example.food03.MainActivity3.h2_2;

import android.content.Context;
import android.content.DialogInterface;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RadioButton;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.Toast;

import androidx.appcompat.app.AlertDialog;

import com.example.food03.LoginActivity;
import com.example.food03.MainActivity;
import com.example.food03.MainActivity3;
import com.example.food03.R;
import com.example.food03.strongweb_bool.HTMLtool;

import java.util.List;

public class WxServiceAdapter_5_1 extends BaseAdapter {
    private Context context;
    private List<WxService5_1> list;
    public static int o=0;
    String pp="";
    public WxServiceAdapter_5_1(Context c, List<WxService5_1> list){
      this.context=c;
        this.list=list;
    }
    @Override
    public int getCount() {
        return list.size();
    }
    @Override
    public Object getItem(int i) {
        return list.get(i);
    }
    @Override
    public long getItemId(int i) {
        return i;
    }
    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        View view1;
        if(view!=null){
            view1=view;
        }else {
            view1=View.inflate(context, R.layout.lu_5_1,null);
        }
        TextView t1=view1.findViewById(R.id.textView10);
        TextView t2=view1.findViewById(R.id.textView14);
        TextView t3=view1.findViewById(R.id.textView15);
        WxService5_1 wxService=list.get(i);
        t1.setText(wxService.getString1());
        t2.setText(wxService.getString2());
        t3.setText(wxService.getString3());
        Button b1=view1.findViewById(R.id.button5);

        return view1;
    }
}
